home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
United Public Domain Gold 2
/
United Public Domain Gold 2.iso
/
utilities
/
pu453.dms
/
pu453.adf
/
extras
/
basic_sources
/
Hyper.bas
< prev
next >
Wrap
BASIC Source File
|
1992-11-08
|
3KB
|
111 lines
SCREEN 1,640,256,3,2
WINDOW 1,"",(0,1)-(631,242),0,1
LIBRARY "graphics.library"
GOSUB remwindow
REM $option K200
RANDOMIZE TIMER
PALETTE 0,.5,.5,.5
PALETTE 1,1,1,1
PALETTE 2,.3,.3,.3
PALETTE 3,.8,.7,.4
PALETTE 4,.7,.7,.7
FOR x = 5 TO 7
PALETTE x,RND,RND,RND
NEXT x
bwt 0,0,20,10,"",0,0
bwt 2,1,18,9,"",0,-1
bwt 6,3,14,7,"",0,0
bwt 100,10,530,40, "DAC - HYPERSpace - v0.1",3,0
bwt 100,50,530,70, "Run Program",2,0
bwt 100,74,530,94, "Edit Graphic",4,0
bwt 100,98,530,118, "Edit Textscreen",4,0
bwt 100,122,530,142,"Edit Bitmap",4,0
bwt 100,146,530,166,"Edit DOS Extension",4,0
bwt 100,170,530,190,"Build Screen",4,0
bwt 100,194,530,214,"Edit Program",4,0
bwt 100,218,530,238,"Configure",4,0
retry:
WHILE MOUSE(0) <> 0 : WEND
WHILE MOUSE(0) = 0 : WEND
WHILE MOUSE(0) <> 0 : WEND
x = MOUSE(1) : y = MOUSE(2)
IF x < 20 AND y < 10 THEN SYSTEM
IF x < 100 OR x > 530 THEN GOTO retry
IF y > 50 AND y < 70 THEN sel = 1 : GOTO skip
IF y > 74 AND y < 94 THEN sel = 2 : GOTO skip
IF y > 98 AND y < 118 THEN sel = 3 : GOTO skip
IF y > 122 AND y < 142 THEN sel = 4 : GOTO skip
IF y > 146 AND y < 166 THEN sel = 5 : GOTO skip
IF y > 170 AND y < 190 THEN sel = 6 : GOTO skip
IF y > 194 AND y < 214 THEN sel = 7 : GOTO skip
IF y > 218 AND y < 238 THEN sel = 8 : GOTO skip
GOTO retry
skip:
fadescreen
bwt 100,100,530,130,"You selected"+STR$(sel),3,-1
WHILE MOUSE(0) <> 0 : WEND
WHILE MOUSE(0) = 0 : WEND
WHILE MOUSE(0) <> 0 : WEND
SYSTEM
SUB BWT(x1,y1,x2,y2,txt$,col,flags) STATIC
l = LEN(txt$)
l = l * 8
DIM buf%(10000)
DIM buf2%(10000)
LOCATE 1,1
GET (0,0)-(l,9),buf2%
LINE (0,0)-(l,9),0,bf
COLOR col
PRINT txt$
GET (0,0)-(l,8),buf%
PUT (0,0),buf2%,PSET
ERASE buf2%
IF x1 > x2 THEN SWAP x1,x2
IF y1 > y2 THEN SWAP y1,y2
IF NOT(flags) THEN
LINE (x1,y1)-(x2,y1),4
LINE (x2,y1)-(x2,y2),4
LINE (x1,y1)-(x1,y2),2
LINE (x2-1,y1+1)-(x2-1,y2-1),4
LINE (x1+1,y1+1)-(x1+1,y2-1),2
LINE (x1,y2)-(x2,y2),2
ELSE
LINE (x1,y1)-(x2,y1),2
LINE (x2,y1)-(x2,y2),2
LINE (x1,y1)-(x1,y2),4
LINE (x2-1,y1+1)-(x2-1,y2-1),2
LINE (x1+1,y1+1)-(x1+1,y2-1),4
LINE (x1,y2)-(x2,y2),4
END IF
LINE (x1+1,y1+1)-(x2-1,y2-1),0,bf
rl = (x2-x1) - l
rl = rl/2
rp = x1 + rl
ry = (((y2-y1) - 8)/2)+y1
IF txt$ <> "" THEN PUT (rp,ry),buf%,PSET
ERASE buf%
END SUB
SUB fadescreen STATIC
FOR x = 0 TO 256 STEP 4
LINE (0,x)-(640,x),0
LINE (0,255-x)-(640,255-x),0
NEXT x
FOR x = 1 TO 256 STEP 4
LINE (0,x)-(640,x),0
LINE (0,255-x)-(640,255-x),0
NEXT x
END SUB
REM $include dh1:hbasic/includes/misc.inc